#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@File    ：ppCar_requests.py
@Author  ：Juff
@Date    ：2023/10/13 15:50 
'''
import fake_useragent
import requests

if __name__ == '__main__':

    # 指定url
    url = 'https://www.renrenche.com/hf/ershouche/'
    # 发送请求
    resp = requests.get(url,headers={
        "User-Agent": fake_useragent.UserAgent().random
    })

    # 获取请求的数据
    print(resp.status_code)
    html_text = resp.text

    # 数据解析

    # 持久化存储
    with open("./hf_car.html",'w',encoding='utf8') as fp:
        fp.write(html_text)

    pass